//
//  HFOrnament.m
//  HocusFocus
//
//  Created by Drew Davidson on 6/8/10.
//  Copyright 2010 Apple Inc. All rights reserved.
//

#import "HFOrnament.h"
#import "HFGraphicProperties.h"


@implementation HFOrnament

@synthesize name;
@synthesize graphicProperties;

- (id)init
{
    return [self initWithName:[[self class] description] graphicProperties:[[[HFGraphicProperties alloc] init] autorelease]];
}

- (id)initWithName:(NSString *)aName
{
    return [self initWithName:aName graphicProperties:[[[HFGraphicProperties alloc] init] autorelease]];
}

- (id)initWithName:(NSString *)aName graphicProperties:(HFGraphicProperties *)aGraphicProperties
{
    self = [super init];
    self.name = aName;
    self.graphicProperties = aGraphicProperties;
    return self;
}

- (BOOL)hitTest:(NSPoint)pt inRect:(NSRect)focusArea
{
    return NSPointInRect(pt, focusArea);
}

- (void)drawInRect:(NSRect)focusArea
{
    [self drawInRect:focusArea highlighted:NO];
}

- (void)drawInRect:(NSRect)focusArea highlighted:(BOOL)yn
{
    // default ornament does nothing
}

@end
